package com.eos.control.action.goods;

import com.eos.business.service.SysDeliverReceiptBusinessService;
import com.eos.common.tool.ConstantTool;
import com.eos.control.action.base.AbstractBaseAction;
import com.eos.orm.mybatis.model.DeliverList;

public class UpdateBillOfSendAction extends AbstractBaseAction {
	private static final long serialVersionUID = 8797205063231532545L;
	private Integer billOfSendId;
	private String deliverListDesc;

	public void setBillOfSendId(Integer billOfSendId) {
		this.billOfSendId = billOfSendId;
	}

	public void setDeliverListDesc(String deliverListDesc) {
		this.deliverListDesc = deliverListDesc;
	}

	@Override
	public String execute() {
		try {
			SysDeliverReceiptBusinessService sdbs = new SysDeliverReceiptBusinessService();
			DeliverList dl = new DeliverList();
			dl.setId(billOfSendId);
			dl.setDeliverDesc(deliverListDesc);
			dl.setStatus(ConstantTool.STATUS_FAIL);
			String exeStatus = sdbs.updateDeliverListPKSelective(dl);
			if("SUCCESS".equals(exeStatus)){
				statusCode = "200";
				message = "删除发货清单数据成功!";
			}else{
				statusCode = "300";
				message = "系统繁忙, 删除发货清单数据失败!";
			}
		} catch (Exception e) {
			e.printStackTrace();
			statusCode = "300";
			message = "系统异常, 删除发货清单数据失败!";
		}
		return SUCCESS;
	}
}
